package com.tjsinfo.tjsoa.documentationflow.dangweishouwen.bo;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.tjsinfo.tjsoa.documentationflow.dangweifawen.vo.TDangweifawenNeirong;
import com.tjsinfo.tjsoa.documentationflow.dangweishouwen.vo.TDangweishouwenFujian;
import com.tjsinfo.tjsoa.documentationflow.dangweishouwen.vo.TDangweishouwenNeirong;
//import com.tjsinfo.tjsoa.documentationflow.gonghuifawei.vo.TGonghuifaweiNeirong;
import com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.TXingzhengshouwenFujian;
import com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.TXingzhengshouwenNeirong;
import com.tjsinfo.tjsoa.system.vo.Files;



public interface ITDangweishouwenNeirongBO {
	/**
	 * 添加党委收文内容
	 * @param 党委发文
	 * @return 党委发文ID
	 */
	public String addTDangweishouweineirong(TDangweishouwenNeirong dangweishouwenNeirong,String qingbanren,List<Files> list,Integer userId);
	
	/**
	 * 添加党委收文内容
	 * @param 党委发文
	 * @return 党委发文ID
	 */
	public String addTDangweishouweineirong(TDangweishouwenNeirong dangweishouwenNeirong,List<String> qingbanren,List<Files> list,Integer userId);
	
	
	/**
	 * 根据ID查询党委收文
	 * @param id
	 * @return
	 */
	public TDangweishouwenNeirong selectOneById(String id);
	/**
	 * 更新党委收文内容
	 * @param zuzhibufaweiNeirong
	 * @return
	 */
	public Boolean updateTDangweishouwenneirong(TDangweishouwenNeirong dangweishouwenNeirong);
	/**
	 * 示例查询党委收文
	 * @param zuzhibufaweiNeirong
	 * @return
	 */
	public List<TDangweishouwenNeirong> findByExample(TDangweishouwenNeirong dangweishouwenNeirong);
	/**
	 * 查询党委收文的总行数
	 * @return
	 */
	public Integer selectDangweishouwenTotalLine();
	
	
	/**
	 * 查询行政收文的总行数
	 * @return
	 */
	public Integer selectDangweishouwenTotalLine(String laiwenjihuan,String laiwenzihao ,String zhaiyao);
	
	
	/**
	 * 查询党委收文分页
	 * @return
	 */
	public List<TDangweishouwenNeirong> selectDangweishouwenPage(Integer first,Integer max);
	
	/**
	 * 查询党委收文分页
	 * @return
	 */
	public List<TDangweishouwenNeirong> selectDangweishouwenPage(Integer first,Integer max,String laiwenjihuan,String laiwenzihao ,String zhaiyao);
	
	/**
	 * 条件查询党委收文的总行数
	 * @return
	 */
	public Integer selectDangweishouwenTotalLineCriteria(DetachedCriteria criteria);
	
	/**
	 * 条件查询党收文分页
	 * @return
	 */
	public List<TDangweishouwenNeirong> selectDangweishouwenPageCriteria(DetachedCriteria criteria, Integer first,Integer max);
	
	/**
	 * 根据年份查询总收文号
	 * @return
	 */
	public Integer selectMaxZongShouWenHaoByYear(String shouwentype);
	/**
	 * 判断是否有同名的总收文文号
	 * @param 总收文文号
	 * @return
	 */
	public Boolean issamezongshouwenhao(String zongshouwenhao);
	
	/**
	 * 删除收文
	 * @param 总收文文号
	 * @return
	 */
	public Boolean deleteDangWeiShouWei(TDangweishouwenNeirong dangweishouwenNeirong);
	
	public List<TDangweishouwenNeirong> selectDownDangWeishouwenNeirong(Integer userId,String proname);
	
	public TDangweishouwenNeirong selectDownDangWeishouwenNeirongById(Integer dataBaseId,String id);
	
	public List<TDangweishouwenFujian>  selectDownDangWeishouwenFuJian(Integer dataBaseId,String id);
	
	public Boolean endTask(Integer dataBaseId,Integer id);
	
	public List<String> selectAllUserId();
	
	public Integer isChuanYueCount(Integer userId, Integer flowId);
	
	public List<TDangweishouwenNeirong> selectDangWeiShouWenDaiBan(Integer userId);
	
	/**
	 * 查询流程上一个环节
	 * @param flowid
	 * @return
	 */
	public String selectTopTask(Integer flowid);
	
	public Boolean deleteTask(Integer taskId);
}
